import request from "@/utils/request.js"

//查询车辆列表
export function listCar(params) {
    return request({
        url: "/car/list",
        method: "GET",
        params
    })
}

//查询车辆详情
export function listCarDtl(carId){
    return request({
        url:`/car/dtl/${carId}`,
        method:"GET",
    })
}

//查询当前小区下的人员信息
export function getPersonInfo(params) {
    return request({
        url: "/car/getPersonInfo",
        method: "GET",
        params
    })
}

//添加小区车辆
export function addCar(data) {
    return request({
        url: "/car",
        method: "POST",
        data,
    })
}

//编辑小区车辆
export function editCar(data) {
    return request({
        url: "/car",
        method: "PUT",
        data,
    })
}

//删除小区车辆
export function deleteCar(carIds) {
    return request({
        url: `/car/${carIds}`,
        method: "DELETE",
    })
}